<?php
error_reporting(0);
if(!$cms)
  include("_cms/classes/cms.inc");
include ($cms->cmspath."classes/geocode.inc");
require ($cms->contentpath."email_verify.php");

if(isset($_GET['ajax_zipcode'])) {
  $geocode = new Geocode();
  $values = $geocode->from_zipcode($_GET['ajax_zipcode'], 'nederland');
  $cms->binary_buffer =  json_encode($values);
  echo $cms->binary_buffer;
  return;
}

if (isset($_GET['ajax_email'])) {
  if(validateEmail($_GET['email'], true)) {
    $cms->binary_buffer = " true";
    echo $cms->binary_buffer;
    return;
  }
  $cms->binary_buffer = '"Dit email domein is niet gevonden"'; return;
  echo $cms->binary_buffer;
}

?>
